$(function(){
	showCondition(true);
	//参数
	var param = $("#tabContent > .tab-pane.active").data();
	var range_ywcWard="";//查询数据的范围
	var raiseDesc=param.depName;
	if(param.value != "undefined")
	{
    	paramTabPage[tabId] = param;
    	range_ywcWard = param.previous;
    	if(param.previous == "depGroup")
		{
    		$('#'+tabId+' #raiseDesc_id').html(raiseDesc);
		}
    	else
		{
    		$('#'+tabId+' #ywcWardHeadTitle').html("科室指标");
		}
	}
    else
	{
    	//初始加载科室层次
		range_ywcWard="dep";//查询数据的范围
		$('#'+tabId+' #ywcWardHeadTitle').html("科室指标");
		// 获取当前登录的科室和科室名
		$.ajax({
			url : "DepCliMonitor/getRoleName.dhc",
			async : false,
			type : "POST",
			success : function(result) {
				var depCode = result.depCode;
				paramTabPage[tabId].depCode = depCode;
			}
		});
	}
	
	
	getQuotas("ywcWard", loadData);
	
	function loadData(totalQuota){
		//科室指标
		loadHospQuota(range_ywcWard,totalQuota,"hospQuotasId","ywcWardTotal");
		
		//加载指标的div
		loadDRGsQuota(totalQuota,"病区","quotasId");
		
		//各个病区层次数据的加载
		loadDRGsQuotaData(totalQuota,"ward",false,null,"ywcWardDetail");
	}
});


